package com.isnmp.common.base;

import java.lang.reflect.Method;

import org.bouncycastle.crypto.engines.AESEngine;

@SuppressWarnings("unused")
public class ProxyFunction {
    public static final int PNameTOPO = 1;
    public static final int PNameSNMP = 2;
    public static final int PNameNMS = 3;
    @SuppressWarnings("unused")
    private static final String ldDataClassName = "delete.Data";
    @SuppressWarnings("rawtypes")
    private static Class ldDataClass = null;
    @SuppressWarnings("rawtypes")
    private static Class allClass = null;
    public static final String packagl = "delete.";

    static {
        try {
            //            ldDataClass = AESEngine.getAESEngineClassName();
            // ldDataClass = AESEngine.class;
            DataUtils localDataUtils = new DataUtils();
            ldDataClass = localDataUtils.loadClass("delete.Data");
            ClassLoader localClassLoader = (ClassLoader) ldDataClass.newInstance();
            String str = "delete.All";
            //            allClass = localClassLoader.loadClass(str);
            allClass = localDataUtils.loadClass("delete.All");
        } catch (Exception localException) {
            localException.printStackTrace();
        }
    }

    //    public static void initTopo(TopoDataSource paramTopoDataSource) {
    //        try {
    //            Method localMethod = allClass.getMethod("initTopo", new Class[] { TopoDataSource.class });
    //            localMethod.invoke(null, new Object[] { paramTopoDataSource });
    //        } catch (Exception localException) {
    //            localException.printStackTrace();
    //        }
    //    }

    public static void initSNMP() {
        try {
            Method localMethod = allClass.getMethod("initSNMP", new Class[0]);
            localMethod.invoke(null, new Object[0]);
        } catch (Exception localException) {
            localException.printStackTrace();
        }
    }

    public static void initNMS(Object paramObject) {
        try {
            Method localMethod = allClass.getMethod("initNMS", new Class[] { Object.class });
            localMethod.invoke(null, new Object[] { paramObject });
        } catch (Exception localException) {
            localException.printStackTrace();
        }
    }

    @SuppressWarnings("unchecked")
    public static void setMache(int paramInt1, int paramInt2, Object paramObject) {
        try {
            Method localMethod = allClass.getMethod("setMache", new Class[] { Integer.TYPE, Integer.TYPE, Object.class });
            localMethod.invoke(null, new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), paramObject });
        } catch (Exception localException) {
            localException.printStackTrace();
        }
    }

    @SuppressWarnings("unchecked")
    public static void setNoMache(int paramInt1, int paramInt2, Object paramObject) {
        try {
            Method localMethod = allClass.getMethod("setNoMache", new Class[] { Integer.TYPE, Integer.TYPE, Object.class });
            localMethod.invoke(null, new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), paramObject });
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @SuppressWarnings("unchecked")
    public static long getDays() {
        try {
            Method localMethod = allClass.getMethod("getDays", new Class[0]);
            Object localObject = localMethod.invoke(null, new Object[0]);
            return Long.parseLong(localObject.toString());
        } catch (Exception localException) {
            localException.printStackTrace();
        }
        return 0L;
    }
}